package modele;

import java.awt.Color;
import java.io.Serializable;

public abstract class FormeGeometrique implements Serializable {

	protected String nom;
	protected Color couleur;
	protected boolean selected = false;


	
	
	
	//constructeurs secondaires
	public abstract FormeGeometrique createClone();
	public abstract FormeGeometrique createSymetrieO(Point origine);
	public abstract FormeGeometrique createSymetrieX(Point origine);
	public abstract FormeGeometrique createSymetrieY(Point origine);
	
	//getters
	public String getNom(){return nom;}
	public Color getCouleur() {return couleur;}
	public boolean isSelected() {return selected;}
	
	//setters
	public void setNom(String nom) {this.nom = nom;}
	public void setCouleur(Color couleur) {this.couleur = couleur;}
	public void setSelected(boolean selected) {this.selected = selected;}
	public void switchSelected(){
		if (selected) setSelected(false);
		else setSelected(true);
	}
	public abstract void deplacer(Point depart, Point destination);
	public abstract boolean isOnTheClick(Point clic);
	
	//observateurs
	public abstract boolean equals(FormeGeometrique o);
	public abstract double perimetre();
	public abstract double surface();
	
	//Mutateurs
	
	public abstract void symetrieO(Point origine);
	public abstract void symetrieX(Point origine);
	public abstract void symetrieY(Point origine);

//window pref java editor syntax coloring	

}